import React, {useState, useEffect} from 'react'
import './index.less'

const Footer = (props) => {
  useEffect(() => {
    console.log(props.match.pathname)
  }, [])

  return (
    <div className='footer'>
      <div className="tab-bar">
        <div className={props.match.pathname === '/' ? 'tab-bar-item active' : 'tab-bar-item'} onClick={() => props.navigate('/')}>首页</div>
        <div className={props.match.pathname === '/mining' ? 'tab-bar-item active' : 'tab-bar-item'} onClick={() => props.navigate('/mining')}>挖矿</div>
        <div className={props.match.pathname === '/property' ? 'tab-bar-item active' : 'tab-bar-item'} onClick={() => props.navigate('/property')}>资产</div>
        <div className={props.match.pathname === '/my' ? 'tab-bar-item active' : 'tab-bar-item'} onClick={() => props.navigate('/my')}>我的</div>
      </div>
    </div>
  )
}

export default Footer;